<% set_title "查看应用 #{@app.name}" %>       
<%= link_to 'Edit', edit_cms_app_path(@app) %> |
<%= link_to 'Back', cms_apps_path %>  
<%= link_to "Publish", publish_cms_app_path(@app),:method => :put,:confirm => "确定吗？" %>
<p>
  <b>Name:</b>
  <%=h @app.name %>
</p>
<p>
  <b>table name:</b>
  <%=h @app.table_source %>
</p
<p>
  <b>Class name:</b>
  <%=h @app.class_name %>
</p>     
<p>
	<b>Show Block</b>
	<%=h @app.show_block %>
</p>
<p>
	<b>Edit Block</b>
	<%=h @app.edit_block %>
</p>
<p>
	<b>List Block</b>
	<%=h @app.list_block %>
</p>              
<hr>
<p>
	<b>List Render</b>
	<pre><%=simple_format h @app.render_content 'list' %></pre>
	<b>Content</b>
	<%#= eval(@app.render_content 'list') %>
	<%#= eval(@app.widget_stickers.with_action('list').first.content) %>
</p>
<p>
  <b>Attributes </b>
	<table id = 'app_attributes'>
		<tr><td>显示名称</td><td>类型</td><td>映射</td></tr>
		<%= render :partial => 'cms/attributes/attribute', :collection => @trs.visibles %>
	</table>                                        
	<%= thickbox_outline '添加属性',new_cms_app_attribute_path(@app),{:title => 'ADD NEW PROPERTY'} %>
  		
</p>    
<hr>
<p>
	<b>App Stickers List</b>
	<% @app.widget_stickers.each do |s| %>
		<%= link_to s.name, cms_sticker_path(s) %>
	<% end -%>
</p>

